#include"Mouse.h"

/////////////////
//include
/////////////////
#include"ANX.h"
#include<Windows.h>
#include"../CXBurst/Debug.h"
/////////////////
//prottype
/////////////////

/////////////////
//const
/////////////////


Mouse::Mouse()
{

}
Mouse::~Mouse()
{
}

void Mouse::Update()
{
	POINT point;
	GetCursorPos(&point);
	ScreenToClient(hwnd,&point);
	pos = Vector2D(point.x,point.y);
}
void Mouse::DebugPrint()
{
#ifdef _DEBUG
	Vector2D tmp = pos.ChengeScreenPos();
	printf("Mouse X = %f,Y = %f\n",tmp.x,tmp.y);
#endif 

}
Vector3D Mouse::GetPos3D()
{
	Vector2D tmp_vec = pos.ChengeScreenPos();
	return Vector3D(tmp_vec.x,tmp_vec.y,0);
}
void Mouse::SetPos(Vector2D pos_)
{
	POINT point;
	point.x = pos_.x;
	point.y = pos_.y;
	ScreenToClient(hwnd,&point);
	pos.x = pos_.x	- point.x + pos_.x;
	pos.y = pos_.y	- point.y+ pos_.y;
	SetCursorPos(pos.x,pos.y);
}
int Mouse::GetWheelPower(){return wheel_power;}
Vector2D Mouse::pos;
HWND	Mouse::hwnd;
int		Mouse::wheel_power;